#!/usr/bin/env node

const fs = require('fs'),
      err = console.error,
      lnk = process.argv[2];
if(typeof(lnk)==='undefined' || process.argv.length !==3){
  err('命令行参数不正确！');
  process.exit(1);
}
try{
  const src = fs.readlinkSync(lnk);
  console.log(`${lnk}-->${src}`);
}catch(e){
  err(e.message);
  process.exit(2);
}
//const src = fs.readlinkSync(lnk);

//console.log(`${lnk} -> ${src}`);
